package top.zackyoung.springboot.entity

import com.baomidou.mybatisplus.annotation.TableName
import lombok.Data
import top.zackyoung.springboot.entity.base.ScalaBaseEntity

import javax.persistence.{Entity, Table}
import scala.beans.BeanProperty


@Entity()
@Table(name = "user")
@TableName("user")
 class ScalaUser extends ScalaBaseEntity[ScalaUser] {
// scala的实体类必须加BeanProperty注解，因为它的get set生成的方法不同，转换成json的时候为{}
  @BeanProperty   var username: String = _
  @BeanProperty   var email: String = _

}

